<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Staff extends Model
{
    //表名
    protected $table = 'staff';

    /**
     * 可以被批量赋值的属性.
     *
     * @var array
     */
    protected $fillable = ['name','phone','email','wechat_openid','agent_id','pwd','status','staff_role_id'];

    //客户表和区域表的关联关系
    public function area()
    {
        return $this->belongsToMany('App\Models\Area','area_staff');
    }
}
